﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using DataAccessLayer;

namespace BusinessLogicLayer
{
    public class TheHocVienBLL
    {
        private TheHocVienDAL dal;

        public TheHocVienBLL()
        {
            try
            {
                dal = new TheHocVienDAL();
            }
            catch { throw; }
        }

        public List<TheHocVienEntity> getAll()
        {
            try
            {
                return dal.getAll();
            }
            catch { throw; }
        }

        public TheHocVienEntity getById(int _id)
        {
            try
            {
                return dal.getById(_id);
            }
            catch { throw; }
        }

        public List<TheHocVienEntity> getByHocVienId(int _id)
        {
            try
            {
                return dal.getByHocVienId(_id);
            }
            catch { throw; }
        }

        public TheHocVienEntity getByHocVien_KhoaHoc(string _maHocVien, int _maKhoaHoc)
        {
            try
            {
                return dal.getByHocVien_KhoaHoc(_maHocVien, _maKhoaHoc);
            }
            catch { throw; }
        }

        public List<TheHocVienEntity> getByKhoaHocId(int _id)
        {
            try
            {
                return dal.getByKhoaHocId(_id);
            }
            catch { throw; }
        }

        public int addTheHocVien(TheHocVienEntity _obj)
        {
            try
            {
                return dal.addTheHocVien(_obj);
            }
            catch { throw; }
        }

        public int deleteTheHocVien(int _id)
        {
            try
            {
                return dal.deleteTheHocVien(_id);
            }
            catch { throw; }
        }

        public int updateTheHocVien(TheHocVienEntity _obj)
        {
            try
            {
                return dal.updateTheHocVien(_obj);
            }
            catch { throw; }
        }
    }
}
